
def helper(array, startIdx, endIdx):
  if startIdx >= endIdx:
    return

  pivot = startIdx
  l = startIdx + 1
  r = endIdx

  while l <= r:
    # case 1
    # case 2
    # case 3
  
  # r is the target position of pivot
  # swap r and pivot
  
  helper(array, 0, r - 1)
  helper(array, r + 1, endIdx)

  # return array

def quickSort(array):
  helper(array, 0, len(array) - 1)